import React from 'react';
import ReactDOM from 'react-dom';
import App from './App'; //引入这个组件，注意这里引入的组件的首字母要大写
import Clock from './clock1';
import PropsOnlyRead from './props的只读性';
import reportWebVitals from './reportWebVitals';
import ComB from './组合组件';
import './类'; //将这个类引入到index文件
import ClockG from './05.时钟';
import ComC from './06.正确的使用组件';
import King from './07.事件';
import Comment from './08.抽离组件';
import ZhanTie from './剪贴板事件';
import ZhanTie1 from './复制粘贴的栗子';
import StoppPlay from './阻止组件的渲染';
import Toggle from './toggle案例';
import AndBox from './与运算符';
import Water from './day06/01纯净组件';
import Kai from './day06/高阶组件/Kai';
import Ton from './day06/高阶组件/Ton';
import './day06/03装饰器语法';
// 引入路由的基本组件，route配方
import { BrowserRouter as Router, Route, Link } from 'react-router-dom'
import Home from './day06/pages/Home'
import About from './day06/pages/About'
import Mine from './day06/pages/Mine'
import Page404 from './day06/pages/page404'
ReactDOM.render(
  <React.StrictMode>
    <Router>
      <Link to='/about'>关于</Link> |
      <Link to='/mine'>我的</Link> |
      <Link to='/home'>主页</Link>
      //当组件匹配到home时，加载home这个组件
      <Route path="/home" component={Home}></Route>
      <Route path="/mine" component={Mine}></Route>
      <Route path="/about" component={About}></Route>
      <Route path='/' exact component={Page404}></Route>
      {/* <Kai/>
      <Ton/> */}
    </Router>
  </React.StrictMode>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
